#include "stdafx.h"
#include "logger.h"

Logger::Logger(const TCHAR* fileName)
{
	f = _wfopen(fileName, L"a+");
}

void Logger::Log(const TCHAR* message, ...)
{
	va_list args;
	va_start(args, message);
	vfwprintf(f, message, args);
	fwprintf(f, L"\r\n");
	va_end(args);
	fflush(f);
}

Logger::~Logger()
{
	fclose(f);
}